<template>
  <view>
    <image class="bg" src="../../static/my/bg.png" mode="aspectFill" />
    <view class="back" @click="goBack">
      <u-icon name="arrow-left" size="24" color="#fff"></u-icon>
    </view>
    <view class="gzBox"><u-icon name="plus" color="#fff" size="14"></u-icon>关注</view>
    <view class="info">
      <view class="tit"
        >官方店铺

        <image src="" mode="aspectFill" />
      </view>
      <view class="line">
        <view class="label">官方自营</view>
        <view>浏览量3.1万｜商品40</view>
      </view>
    </view>
    <view class="tabsCon">
      <view class="tabsBox">
        <view class="itemBox" v-for="(item, index) in list1">
          <view @click="tabActive1 = item.name" :class="{ default: true, active: tabActive1 == item.name }">{{ item.name }}</view>
        </view>
      </view>
    </view>
    <view class="listBox">
      <view style="width: 49%" v-for="(item, index) in 5">
        <GoodsItem />
      </view>
    </view>
  </view>
</template>
<script setup lang="ts">
import { goBack } from "@/utils/commonFn";
import GoodsItem from "./components/GoodsItem.vue";
import { ref } from "vue";
// 创建响应式数据
const list1 = ref([{ name: "推荐" }, { name: "品牌好物" }, { name: "休闲食品" }, { name: "服饰鞋包" }, { name: "日用百货" }]);
const tabActive = ref("1");
const tabActive1 = ref("推荐");
</script>
<style lang="less" scoped>
.bg {
  height: 284rpx;
  width: 100%;
}
.gzBox {
  background: #81d8d0;
  border-radius: 200rpx 200rpx 200rpx 200rpx;
  position: absolute;
  top: 102rpx;
  right: 32rpx;
  display: flex;
  align-items: center;
  padding: 16rpx;
  font-size: 28rpx;
  color: #ffffff;
  gap: 8rpx;
}
.info {
  padding: 32rpx;
  background: #fff;
  .tit {
    font-size: 40rpx;
    color: #333333;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    image {
      width: 164rpx;
      height: 164rpx;
      background: #698a9a;
      margin-top: -130rpx;
      border-radius: 50%;
    }
  }
  .line {
    display: flex;
    align-items: center;
    margin-top: 22rpx;
    font-size: 24rpx;
    color: #8a8a8d;
    .label {
      background: #81d8d0;
      border-radius: 8rpx 8rpx 8rpx 8rpx;
      font-size: 24rpx;
      color: #fff;
      padding: 8rpx;
      margin-right: 20rpx;
    }
  }
}
.tabsCon {
  padding: 32rpx;
  background-color: #fff;
  margin-top: 24rpx;
}
.listBox {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background-color: #f3f4f6;
  margin-top: 20rpx;
}
</style>
